package com.minimalist.common.entity.basic.vo.tenant;

import com.minimalist.common.config.mybatis.bo.PageReq;
import com.minimalist.common.config.swagger.SchemaEnum;
import com.minimalist.common.entity.basic.enums.StatusEnum;
import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serial;
import java.io.Serializable;
import java.util.Objects;

/**
 * @author 11987
 */
@Schema(name = "租户套餐查询实体")
public class TenantPackageQueryVO extends PageReq implements Serializable{

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(name = "packageName", description = "套餐名称", type = "string")
    private String packageName;

    @SchemaEnum(implementation = StatusEnum.class)
    @Schema(name = "status", description = "租户套餐状态", type = "integer")
    private Byte status;

    public TenantPackageQueryVO(Long pageNum, Long pageSize){
        super(pageNum, pageSize);
    }

    public TenantPackageQueryVO(Long pageNum, Long pageSize, String packageName, Byte status){
        super(pageNum, pageSize);
        this.packageName = packageName;
        this.status = status;
    }

    public String getPackageName(){
        return packageName;
    }

    public void setPackageName(String packageName){
        this.packageName = packageName;
    }

    public Byte getStatus(){
        return status;
    }

    public void setStatus(Byte status){
        this.status = status;
    }

    @Override
    public boolean equals(Object o){
        if (this == o){
            return true;
        }
        if (o == null || getClass() != o.getClass()){
            return false;
        }
        if (!super.equals(o)){
            return false;
        }
        TenantPackageQueryVO that = (TenantPackageQueryVO) o;
        return Objects.equals(packageName, that.packageName) &&
                Objects.equals(status, that.status);
    }

    @Override
    public int hashCode(){
        return Objects.hash(super.hashCode(), packageName, status);
    }

    @Override
    public String toString(){
        return "TenantPackageQueryVO{" +
                "packageName='" + packageName + '\'' +
                ", status=" + status +
                "} " + super.toString();
    }
}
